#ifndef _POD_H_
#define _POD_H_

#include "protocol.h"

#include <time.h>
#include <process.h>

#include "comp_def.h"
#include "err_code.h"
#include "filters.h"
#include "platform.h"
#include "statemc.h"
#include "fpf.h"
#include "pospf.h"
#include "ppf.h"
#include "logfile.h"

#define RT_INTERVAL 15
#define INTERVAL 0.015 // in seconds!

#define fpPLATFORM_PARAMETERS "platform.pp"
#define fpPOSITION_PARAMETERS "dof.pos"
#define fpFILTER_PARAMETERS "host.fil"
#define fpMAIN "main.out"
#define adrMCC 0x208

class Pod
{
   private:
      TPlatform platform;
      TFilterGroup filters;
      TPositionParameters positions;
      static TStateMachineState state;
      static BYTE state_changed;
      static bool running;
      static unsigned int __stdcall run(void*);
   public:
      static float x, y, z, roll, pitch, yaw;
      static int inputs[NUM_INPUTS];
      Pod(void);
      void start(void);
      void stop(void);
      void home(void);
      void park(void);
      void follow(void);
      const char* get_state(void);
};

#endif
